<!DOCTYPE html>
<html lang="en">
<head>
    {{template "pc/public/mycss.html" .}}
    <link rel="stylesheet" href="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/pc/css/index.min.css?v=123" />
</head>
<style type="text/css">
  .shopmall ul li {
     position: relative;
  }
</style>
<body class="search">
<div id="wrapper" class="wrapper-full banners-effect-7">
    <!-- Header Container  -->
  {{template "pc/public/head.html" .}}
    {{template "pc/public/search.html" .}}
    <div style="background-color: white;" class="main-container container">
        <div class="row mb-50">
            <div style="background-color: white;" style="width: 100%;" id="content" class="col-md-10 col-sm-8 right mt-15">
                <div class="mycollection myfollow">
                        <div class="shopmall">
              {{if .info}}
                            <ul>
                {{range .info}}
                {{ if .gid }}
                {{$gid := .gid}}
                                <li id="{{.id}}">
                                    <div class="clearfix">
                                        <a href=""><img src="{{.pathname}}"></a>
                                        <p>
                                            <span class="overpl1"><a href="/shop?id={{.gid}}" class="dp">{{.name}}</a></span>
                                            <span class="overpl1">关注人数：{{.num}}</span>
                      {{if eq .gid "0"}}
                      <span class="overpl1">主营：<a href="/">{{.fw}}</a></span>
                      {{else}}
                                            <span class="overpl1">主营：{{range .fw}}<a href="/shop?search={{.name}}&id={{$gid}}">{{.name}}</a>&nbsp;&nbsp;{{end}}</span>
                      {{end}}
                                        </p>
                                        <div class="mt-30">
                                            销量<span class="mr-20">{{.sellnum}}</span>  共<span>{{.pnum}}</span>件宝贝
                                            
                                        </div>
                                    </div>
                                    <div style="text-align: right;" class="shop-products">
                    {{range .product}}
                                        <a href="/product/content?id={{.id}}">
                                            <img src="{{.pathname}}">
                                            <p>￥{{if .vprice}}{{.vprice}}{{else}}{{.price}}{{end}}</p>
                                        </a>
                    {{end}}
                                    </div>
                                </li>
                {{end}}
                {{end}}
                            </ul>
              {{else}}
              <!-- 默认图 -->
              {{end}}
                        </div>
                    </div>
                </div>
            </div>
        </div>
        {{if .paginator}}
        {{if ne .paginator.totalpages 1}}
        <div class="pageView">
            <b class="btn">
                {{if ne .paginator.currpage 1}}
                <a href="{{.url}}page={{.paginator.prevpage}}"><b>&lt;&lt;上一页</b></a>
                {{else}}
                <b>&lt;&lt;上一页</b>
                {{end}}
                {{range $index,$page := .paginator.pages}}
                {{if eq $.paginator.currpage $page}}
                <b>{{$page}}</b>
                {{else}}
                <a href="{{$.url}}page={{$page}}"><b>{{$page}}</b></a>
                {{end}}
                {{end}}
                {{if eq .paginator.currpage .paginator.totalpages}}
                <b>下一页&gt;&gt;</b>
                {{else}}
                <a href="{{.url}}page={{.paginator.nextpage}}"><b>下一页&gt;&gt;</b></a>
                {{end}}
            </b>
            <b class="other">
              共{{.paginator.totalpages}}页，到第<input type="text" name="p">页<button id="go">确定</button>
            </b>
        </div>
        {{else}}
          <div class="pageView">
            <b class="btn">
                <a>1</a>
            </b>
          </div>
        {{end}}
        {{end}}
    </div>


<!-- Footer Container -->
{{template "pc/public/foot.html" .}}
{{template "pc/public/myfoot.html" .}}
</body>
</html>
<script type="text/javascript" src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/pc/js/jquery.min.js"></script>
<script type="text/javascript">
    $('#go').click(function(){
        var totalpages={{.paginator.totalpages}};
        var num=$('input[name="p"]').val()
        if(num<=totalpages){
            window.location.href={{.url}}+`page=`+num
        }
    })
</script>